from factory import factory

class commandMeta(type):
    def __new__(obj, name, base, attributes):
        if name == 'command':
            return super(commandMeta, obj).__new__(obj, name, base, attributes)

        ret = super(commandMeta, obj).__new__(obj, name, base, attributes)
        factory.register(ret)
        return ret